#!/usr/bin/env python
# -*- coding: utf-8 -*-
#Intesim Python Script

Model.updateSolverList()
Model.updateSolverList()
Mesh.openFile('E:/3jidianqimotaifenxi/jdqmotaifenxi.xml')
Model.updateSolverList()
Window.updateTree()
Model.solvePhysicsModel('model_1')
Post.setView('ElementView')
Model.updateSolverList()
Post.openPostWindow('E:/3jidianqimotaifenxi/jdqmotaifenxi.model_1.model.res/jdqmotaifenxi.model_1.model_ModalResults-ModalShapeData-Case(0)_0001.res.inp', 'model_1')
scalar_plot = Post.newScalar('model_1')
scalar_plot.name = 'mode 1 displacement sum'
scalar_plot.dataAdapterID = 3
scalar_plot.appendCompId( 1) 
scalar_plot.appendCompId( 2) 
scalar_plot.appendCompId( 3) 
scalar_plot.appendCompId( 4) 
scalar_plot.appendCompId( 5) 
scalar_plot.appendCompId( 6) 
scalar_plot.appendCompId( 7) 
scalar_plot.appendCompId( 8) 
scalar_plot.setDraw(True)
scalar_plot.min = 0
scalar_plot.max = 12.4962
scalar_plot.length = 400
scalar_plot.dataCount = 12
scalar_plot.location = 0
scalar_plot.setAutoPosition(True)
scalar_plot.hideoutrange = False
scalar_plot.show()
del scalar_plot
Post.setView('FitView')
Window.setView('fitView')
scalar_plot = Post.newScalar('model_1')
scalar_plot.name = 'mode 2 displacement sum'
scalar_plot.dataAdapterID = 7
scalar_plot.appendCompId( 1) 
scalar_plot.appendCompId( 2) 
scalar_plot.appendCompId( 3) 
scalar_plot.appendCompId( 4) 
scalar_plot.appendCompId( 5) 
scalar_plot.appendCompId( 6) 
scalar_plot.appendCompId( 7) 
scalar_plot.appendCompId( 8) 
scalar_plot.setDraw(True)
scalar_plot.min = 0
scalar_plot.max = 13.5652
scalar_plot.length = 400
scalar_plot.dataCount = 12
scalar_plot.location = 0
scalar_plot.setAutoPosition(True)
scalar_plot.hideoutrange = False
scalar_plot.show()
del scalar_plot
scalar_plot = Post.newScalar('model_1')
scalar_plot.name = 'mode 3 displacement sum'
scalar_plot.dataAdapterID = 11
scalar_plot.appendCompId( 1) 
scalar_plot.appendCompId( 2) 
scalar_plot.appendCompId( 3) 
scalar_plot.appendCompId( 4) 
scalar_plot.appendCompId( 5) 
scalar_plot.appendCompId( 6) 
scalar_plot.appendCompId( 7) 
scalar_plot.appendCompId( 8) 
scalar_plot.setDraw(True)
scalar_plot.min = 0
scalar_plot.max = 17.6117
scalar_plot.length = 400
scalar_plot.dataCount = 12
scalar_plot.location = 0
scalar_plot.setAutoPosition(True)
scalar_plot.hideoutrange = False
scalar_plot.show()
del scalar_plot
Post.setView('FitView')
Window.setView('fitView')
Post.setView('FitView')
Window.setView('fitView')
block = Model.models['model_1'].blockList.at(5)
block.coordSysId = -1
block.motionType = 'Translational'
block.coefValue = 0
block.coefValueType = ''
block.thermalConductance = 0
block.thermalConductanceType = ''
block.electricalResistivity = 0
block.electricalResistivityType = ''
block.frictionCoff = 0
block.frictionCoffType = ''
block.penalty = 0
block.penaltyType = ''
block.fitValue = 0
block.fitType = ''
block.mapValue = 0.6
block = Model.models['model_1'].blockList.at(6)
block.coordSysId = -1
block.motionType = 'Translational'
block.coefValue = 0
block.coefValueType = ''
block.thermalConductance = 0
block.thermalConductanceType = ''
block.electricalResistivity = 0
block.electricalResistivityType = ''
block.frictionCoff = 0
block.frictionCoffType = ''
block.penalty = 0
block.penaltyType = ''
block.fitValue = 0
block.fitType = ''
block.mapValue = 0.6
block = Model.models['model_1'].blockList.at(6)
block.mapValue = 0.8
Model.solvePhysicsModel('model_1')
Post.updateResult('E:/3jidianqimotaifenxi/jdqmotaifenxi.model_1.model.res/jdqmotaifenxi.model_1.model_ModalResults-ModalShapeData-Case(0)_0001.res.inp','model_1')
scalar_plot = Post.newScalar('model_1')
scalar_plot.name = 'mode 1 displacement sum'
scalar_plot.dataAdapterID = 3
scalar_plot.appendCompId( 1) 
scalar_plot.appendCompId( 2) 
scalar_plot.appendCompId( 3) 
scalar_plot.appendCompId( 4) 
scalar_plot.appendCompId( 5) 
scalar_plot.appendCompId( 6) 
scalar_plot.appendCompId( 7) 
scalar_plot.appendCompId( 8) 
scalar_plot.setDraw(True)
scalar_plot.min = 0
scalar_plot.max = 12.4962
scalar_plot.length = 400
scalar_plot.dataCount = 12
scalar_plot.location = 0
scalar_plot.setAutoPosition(True)
scalar_plot.hideoutrange = False
scalar_plot.show()
del scalar_plot
Post.setView('FitView')
Window.setView('fitView')
Mesh.saveFile('E:/3jidianqimotaifenxi/jdqmotaifenxi.xml')
Mesh.saveFile('E:/3jidianqimotaifenxi/jdqmotaifenxi.xml')
